package www.xpu.edu.app;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;

import java.util.List;

public class Stu12Adpter extends ArrayAdapter<Stu12> {
    private int id;
    public Stu12Adpter(Context context, int resource, List<Stu12> objects) {
        super(context, resource, objects);
        id=resource;
    }


    @Override
    public View getView(int position,View convertView, ViewGroup parent) {
       // return super.getView(position, convertView, parent);
        Stu12 stu12=getItem(position);
        View view=LayoutInflater.from(getContext()).inflate(id,parent,false);
        TextView text1=(TextView)view.findViewById(R.id.stu12_adapter_text1);
        TextView text2=(TextView)view.findViewById(R.id.stu12_adapter_text2);
        TextView text3=(TextView)view.findViewById(R.id.stu12_adapter_text3);
        text1.setText(stu12.getTel().toString());
        int recruit_id = stu12.getResume_id();
        text2.setText(String.valueOf(recruit_id));
        text3.setText(stu12.getContext());
        return view;
    }
}
